package org.zebra.web.sse;

import lombok.Getter;

/**
 * sse消息
 *
 * @author zhanghongbin
 */
@Getter
public class SseMessage<T> {

    // 主题：不同位置推送的内容不同
    private String topic = "";

    // 推送消息
    private T data;

    public SseMessage(String topic, T data) {
        this.topic = topic;
        this.data = data;
    }

    public SseMessage(T data) {
        this.data = data;
    }
}
